package com.bycx.system.service.impl;
import java.io.Serializable;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.bycx.core.service.BaseService;
import com.bycx.system.model.ASysOrgPosition;
import com.bycx.system.mapper.ASysOrgPositionMapper;
import com.bycx.system.service.IASysOrgPositionService;

@Service
public class ASysOrgPositionServiceImpl implements IASysOrgPositionService{
	@Autowired
	private ASysOrgPositionMapper aSysOrgPositionMapper;

	@Override
	public ASysOrgPosition get(Map<String,Object> map){
		return aSysOrgPositionMapper.get(map);
	}
	@Override
	public List<ASysOrgPosition> getList(Map<String,Object> map){
		return aSysOrgPositionMapper.getList(map);
	}
	
	@Override
	public List<ASysOrgPosition> getPositionInfoByOrgCode(String orgCode) {
		String orgcode="";
		System.out.println(orgcode);
		if(orgCode.trim().equals("") || orgCode.trim().length()<2)
		{
			return null;
		}
		//这里不管是不是组织机构的部门的下级，都支取两位，总公司的部门
		orgcode=orgCode.substring(0,2);
	    return aSysOrgPositionMapper.getPositionInfoByOrgCode(orgcode);
		
	}
	@Override
	public void setBaseMapper() {
		// TODO Auto-generated method stub
		
	}
	@Override
	public ASysOrgPosition getByPrimaryKey(Serializable primaryKey) {
		// TODO Auto-generated method stub
		return null;
	}
	@Override
	public ASysOrgPosition get(String propName, String value) {
		// TODO Auto-generated method stub
		return null;
	}
	@Override
	public List<ASysOrgPosition> getList(String propName, String value) {
		// TODO Auto-generated method stub
		return null;
	}
	@Override
	public void save(ASysOrgPosition t) {
		// TODO Auto-generated method stub
		
	}
	@Override
	public void updateByPrimaryKey(ASysOrgPosition t) {
		// TODO Auto-generated method stub
		
	}
	@Override
	public void deleteByPrimaryKey(Serializable primaryKey) {
		// TODO Auto-generated method stub
		
	}
	@Override
	public void delete(List<String> ids) {
		// TODO Auto-generated method stub
		
	}
	@Override
	public void deleteObj(List<ASysOrgPosition> list) {
		// TODO Auto-generated method stub
		
	}
}

